home *** CD-ROM | disk | FTP | other *** search
- on Blur startImg
- doCrop = 1
- if ilk(startImg) <> #image then
- return VOID
- end if
- buffer = image(startImg.width + 4, startImg.height + 4, 24)
- myrect = rect(0, 0, startImg.width, startImg.height)
- offsetL = [[4, 4], [4, 0], [0, 4], [0, 0], [3, 4], [3, 0], [1, 4], [4, 3], [4, 1], [0, 3], [1, 0], [0, 1], [2, 0], [2, 4], [0, 2], [4, 2], [3, 3], [1, 1], [3, 1], [1, 3], [3, 2], [1, 2], [2, 3], [2, 1], [2, 2]]
- blendLL = [0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 10, 10, 10, 10, 16, 16, 16, 16, 26, 26, 26, 26, 26]
- repeat with j = 1 to 25
- myBlend = blendLL[j] * 4
- if not myBlend then
- next repeat
- end if
- destRect = myrect.offset(offsetL[j][1], offsetL[j][2])
- buffer.copyPixels(startImg, destRect, myrect, [#blendLevel: myBlend])
- end repeat
- return buffer.crop(myrect.offset(2, 2))
- end
-